<!DOCTYPE html>
<html lang="" data-dpr="1" class=" " data-theme="light" style="font-size: 37.5px;">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link rel="icon" href="/favicon.ico">
    <link href="/static/home/css/profit.css" rel="stylesheet">
    <title>{$page_title}</title>
</head>
<body style="font-size: 12px;">
    <div id="app">
        <div class="main">
            <div class="top">
                <div onClick="javascript :history.back(-1);" class="back">
                    <img class="" src="/static/home/image/back.png" />
                </div>
                <div class="title">
                    挖矿数据
                </div>
            </div>

            <div class="card">
                <div class="van-tabs van-tabs--line">
                    <div class="van-tabs__wrap">
                        <div class="van-tabs__nav van-tabs__nav--line" style="border-color: rgb(115, 40, 236); background: transparent;">
                            <div class="van-tab" style="color: rgba(255, 255, 255, 0.51);">
                                <span class="van-tab__text van-tab__text--ellipsis">挖矿介绍</span>
                            </div>
                            <div class="van-tab" style="color: rgb(255, 255, 255);">
                                <span class="van-tab__text van-tab__text--ellipsis">收益明细</span>
                            </div>
                            <div class="van-tabs__line" style="background-color: rgb(115, 40, 236); transform: translateX(266.5px) translateX(-50%);"></div>
                        </div>
                    </div>
                    <!--挖矿介绍 start-->
                    <div style="display: none" class="van-tabs__content article van-tabs__content--animated">
                        <div class="van-tabs__track"
                             style="transform: translate3d(0%, 0px, 0px); transition-duration: 0.3s;">
                            <div  class="van-tab__pane-wrapper">
                                <div class="van-tab__pane">
                                    <div class="contents">
                                        <div class="yqlink">
                                            <div class="ltxt"> 介绍</div>
                                        </div>
                                        <div class="ttx"> 子币名称：Pi Link</div>
                                        <div class="ttx"> 简称：PIL</div>
                                        <div class="ttx"> 中文名：派链</div>
                                        <div class="ttx"> 发行量：64000枚【社区成立日】</div>
                                        <div class="ttx"> 流通量：64000枚</div>
                                        <div class="ttx"> 上线后权限销毁</div>
                                        <div class="line"></div>
                                        <div class="yqlink">
                                            <div class="ltxt"> 合约机制</div>
                                        </div>
                                        <div class="ttx"> 每笔交易通缩4％</div>
                                        <div class="ttx"> 【滑点建议4.3~6】</div>
                                        <div class="ttx"> 2％布道奖励</div>
                                        <div class="ttx"> 1％营销钱包</div>
                                        <div class="ttx"> 0.5％社区治理</div>
                                        <div class="ttx"> 0.5％股东分红</div>
                                        <div class="line"></div>
                                        <div class="yqlink">
                                            <div class="ltxt"> 挖矿方式</div>
                                        </div>
                                        <div class="ttx"> Mdex里添加PiMoon/HT流动池，质押LP令牌挖PIL。</div>
                                        <div class="ttx"> 挖矿周期三个月：</div>
                                        <div class="ttx"> 第一个月挖20％</div>
                                        <div class="ttx"> 第二个月挖30％</div>
                                        <div class="ttx"> 第三个月挖50％</div>
                                        <div class="ttx"> 三个月挖出总量：64000枚。</div>
                                        <div class="line"></div>
                                        <div class="ttx"> 挖矿开启时间：2022年1月28日。</div>
                                        <div class="ttx"> 挖矿结束后，2022年5月1日上线交易</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--挖矿介绍 end-->

                    <div class="van-tabs__content profit_content van-tabs__content--animated">
                        <div class="van-tabs__track" style="transform: translate3d(-100%, 0px, 0px); transition-duration: 0.3s;">
                            <div role="tabpanel" aria-hidden="true" class="van-tab__pane-wrapper van-tab__pane-wrapper--inactive" >
                                <div class="van-tab__pane" ></div>
                            </div>
                            <div role="tabpanel" class="van-tab__pane-wrapper" >
                                <div class="van-tab__pane" >
                                    <div class="content" >
                                        <div class="van-pull-refresh" >
                                            <div class="van-pull-refresh__track" style="transition-duration: 0ms;">

                                                <div role="feed" class="van-list no_profit_list">
                                                    <div class="item">
                                                        <div class="ttxt">LP令牌数/占比</div>
                                                        <div class="ttxt">收益</div>
                                                    </div>
                                                    <div class="noData">
                                                        <img style="width: 50%;" src="/static/home/image/nodata.png">
                                                    </div>
                                                    <div class="van-list__finished-text">
                                                        没有更多了
                                                    </div>
                                                    <div class="van-list__placeholder"></div>
                                                </div>

                                                <div style="display: none" data-suffix="{$suffix}" data-start_size="0" class="van-list profit_list">
                                                    <div class="item">
                                                        <div class="ttxt">LP令牌数/占比</div>
                                                        <div class="ttxt">收益</div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
            <div class="buttoms">{:config("dbconfig.sys.copyright")}</div>
        </div>
    </div>

    <script src="/static/home/js/jquery-1.9.1.js"></script>
    <script>
        $(function () {
            let address = "{$address}";
            let suffix = "{$suffix}";
            let start_size = 0;
            let is_bottom = 0;
            profitList();
            window.addEventListener('scroll', function(){
                if(window.pageYOffset + window.innerHeight >= document.documentElement.scrollHeight) {
                    profitList();
                }
            });
            //加载收益列表
            function profitList(){
                if(is_bottom == 1 || typeof address === 'undefined' || address == ''){
                    return;
                }
                $.ajax({
                    type:'post',
                    url:"/home/Index/profitList",
                    data:{address:address,start_size:start_size,suffix:suffix},
                    dataType:'json',
                    success:function(res){
                        if(res.status == 1){
                            is_bottom = res.data.is_bottom;
                            suffix = res.data.suffix;
                            start_size = res.data.start_size;
                            var list = res.data.list;
                            var html = '';
                            for (var i=0; i < list.length; i++){
                                html += '<div class="item">';
                                html += '<div class="lines">';
                                html += ' <div class="left">'+list[i]['lp']+'/ <span class="bl">'+list[i]['rate']+'%</span></div>';
                                html += ' <div class="time">'+list[i]['c_date']+'</div></div><div><div class="right">+'+list[i]['token']+'</div></div></div>';
                            }
                            $(".profit_list").append(html);
                            if($('.profit_list').children(".item").length > 1){
                                $(".no_profit_list").hide();
                                $(".profit_list").show();
                            }
                        }
                    },
                    error: function(e){
                    },
                });
            }
            $(".van-tab").click(function () {
                var index = $(".van-tab").index(this);
                $(".van-tab").css("color","rgba(255, 255, 255, 0.51)");
                $(this).css("color","rgba(255, 255, 255, 255)");
                if(index == 0 && $('.article').css('display') == 'none'){
                    $(".profit_content").hide();
                    $(".van-tabs__nav .van-tabs__line").css('transform','translateX(266.5px) translateX(-950%)');
                    $(".article").slideToggle();
                }else if(index == 1 && $('.profit_content').css('display') == 'none'){
                    $(".article").hide();
                    $(".van-tabs__nav .van-tabs__line").css('transform','translateX(266.5px) translateX(-50%)');
                    $(".profit_content").slideToggle();
                }
            });

        })
    </script>
<!--    <script src="/static/home/js/profit.js"></script>-->
</body>
</html>